<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::any('/wechat', 'WechatController@serve');
Route::group(['middleware'=> 'wechat'], function(){
    Route::get('/test', 'WechatController@test');
});

// Route::group(['middleware' => 'login'], function(){
    Route::get('/index', 'WechatController@index');
    Route::get('/result', 'WechatController@createResult');
// });

Route::get('/user/login','WechatController@userAuth');
//创建二维码
Route::get('/qrcode', "WechatController@createQrcode");

//分享
Route::post('/share', 'WechatController@share');

//统计数据
Route::get('/myresult', 'WechatController@getResult');
